package com.individual.provider;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Calendar;

@Slf4j
@RestController
@EnableDiscoveryClient
@SpringBootApplication
public class ProviderApplication {

    @Value("${server.port}")
    Integer port;

    @GetMapping("/test")
    public String test(){
        log.info("port is: " + port);
        return "load balance service port: " + port;
    }

    @PostMapping("/formData")
    public String getFormData(){
        log.info("port is: " + port);
        return "success";
    }

    public static void main(String[] args) {
        SpringApplication.run(ProviderApplication.class, args);
    }

}
